﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta content='IE=edge' http-equiv='X-UA-Compatible'>
    <title>iframe 标题 </title>
</head>
<body style="text-align:center;">
    <button id="btn1">获取父窗口内容</button>
    <button id="btn2">打开新窗口，无需引用插件，只需要顶级页面引用即可</button>
    <br />
    <img src="baiqian.jpg" alt="" title="" style="margin:30px auto;width:320px;" />
    <p>Layx 是一款在浏览器端模拟 Windows 弹出窗口 的原生Javascript插件。</p>
    <script src="../layx-iframe.js" type="text/javascript"></script>
    <script type="text/javascript">
        document.getElementById('btn1').onclick = function () {
            alert(top.window.document.body.innerHTML);
        };
        document.getElementById('btn2').onclick = function (event) {
            top.layx.open({
                id: 'demo-test1',
                content: ['iframe', './demo/iframe.html'],  // iframe为类型，预留字段，后续将有其他类型
                screen: 'lt'
            });
            // 阻止冒泡
            event.stopPropagation();
        };
    </script>
</body>
</html>